package cn.com.bluemoon.daps.standard.entity;

import cn.com.bluemoon.daps.common.domain.BaseModel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 标准：基础、指标的流程基础字段
 *
 * @author Jarod.Kong
 * @date 2020/8/20 11:34
 */
@Setter
@Getter
@ToString
public abstract class BasePublishInfoOfStandard<T extends BaseModel<T>>
        extends BaseModel<T> implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "增加标准唯一id，由于同一标准存在多版本，为了明确对外的唯一版本")
    private String standardUniqueId;

    @ApiModelProperty(value = "增加标准发布状态 1为【已发布的最新版本】")
    private Boolean publishNewest;

    @ApiModelProperty(value = "发布时间，针对审批完后的数据")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime publishTime;


    /**
     * 增加标准标识 标记是最新已发布数据对应的流程中存在变更数据
     * true 存在
     */
    @ApiModelProperty(value = "增加标准标识 标记是最新已发布数据对应的流程中存在变更数据", hidden = true)
    @TableField(exist = false)
    private boolean auditChanging;

}
